home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / libz / Original.head < prev    next >
Encoding:
Internet Message Format  |  1989-09-10  |  4.5 KB

  1. Path: mirror!adelie!necntc!husc6!seismo!munnari!sources-request
  2. From: sources-request@munnari.oz
  3. Newsgroups: mod.sources
  4. Subject: v08i085:  Public Domain (Table Driven) ``localtime'', Part01/03
  5. Message-ID: <1435@munnari.oz>
  6. Date: 28 Feb 87 11:49:08 GMT
  7. Sender: kre@munnari.oz
  8. Lines: 1058
  9. Approved: kre@munnari.oz.au
  10.  
  11. Submitted by: Arthur David Olson <ado@elsie.UUCP>
  12. Mod.sources: Volume 8, Issue 85
  13. Archive-name: pd-localtime/Part01
  14.  
  15.     [ This is the latest release of the table (file) driven
  16.       ctime(3), originally released as "settz" in Vol 4 issue 14.
  17.  
  18.       Normally, I don't post mod.sources articles that originate
  19.       outside Australia, but this is something of a special case,
  20.       in that I've been (slightly) involved in the development.
  21.  
  22.       This posting is important in North America (or just the USA?)
  23.       now, because of forthcoming changes to the Daylight Saving
  24.       Rules.  I suggest that source licensees install these library
  25.       functions in libc as soon as possible, then recompile everything
  26.       that uses localtime() or ctime().  You should never need to go
  27.       through that again!  (Later versions of this code will likely be
  28.       available, but they should merely add functionality for new
  29.       programs, old ones compiled with this release should continue
  30.       to work).
  31.  
  32.       If you have only a binary licence, you should insist that your
  33.       vendor install this code into its standard release ASAP, and
  34.       send you an update distribution.  In the meantime, you could
  35.       install this in your libc.a, and have any sources that you
  36.       do compile show the time correctly.  This is probably not
  37.       a real good idea though.
  38.  
  39.       It is possible to install this code in a separate library (in
  40.       fact, that's how it is distributed - as the details of exactly
  41.       how to update libc.a are too variable to include here), and
  42.       then explicitly reference it on all compilations that need
  43.       any of the time functions.
  44.  
  45.       There are a number of compilation options, described in the
  46.       Makefile (be sure to read that before compiling).  I suggest
  47.       that you define KRE_COMPAT (yes, that's me..) and STD_INSPIRED.
  48.       If you want compatibility with some of the less broken parts of
  49.       the time implementations in Sys V, or BSD releases, you can also
  50.       define USG_COMPAT or BSD_COMPAT respectively.  Finally, TZA_COMPAT
  51.       will give Vol 4 "settz" release timezone name scheme compatability.
  52.       You get tzname[] regardless of the setting of USG_COMPAT.  Having
  53.       it included this way is an arguable benefit, it might remove itself
  54.       into the USG_COMPAT version in later releases.
  55.  
  56.       One program that will cause some problems in compiling, is
  57.       date(1).  The date patches posted in Vol 6 Issue 12 should help
  58.       here (you will need TZA_COMPAT, and BSD_COMPAT on BSD systems).
  59.       A new (public domain) version of date(1) is expected soon.
  60.       It will use the STD_INSPIRED functions included here, so if
  61.       you plan on using that when it appears, define STD_INSPIRED now.
  62.  
  63.       Problems: With BSD_COMPAT ctime.c will become an empty file.
  64.       Without STD_INSPIRED timemk.c will become an empty file.
  65.       In general this is OK (the compiler doesn't mind), however
  66.       some versions of ranlib(1) simply can't deal with this.
  67.       Defining STD_INSPIRED will will fix timemk.c.  ctime.c on
  68.       BSD systems is harder.  If you are going to install this in
  69.       libc.a, then best if to remove the #ifndef/#endif that surround
  70.       ctime.c, and the duplicate version of ctime (in #ifdef BSD_COMPAT)
  71.       in localtime.c.  The problem that is supposed to circumvent
  72.       will not occur in that case.  If you want to keep these functions
  73.       in libz.a then easiest is probably to add some nonsense declaration
  74.       to ctime.c (outside the ifdefs) so that the file is not empty.
  75.  
  76.       Finally, you should be aware that this code is designed to work
  77.       correctly (without changes) regardless of whether time_t is a
  78.       signed or unsigned type, and however many bits it contains
  79.       (withing reason), provided only that it is a standard arithmetic
  80.       type (not an array or struct).  The compiled timezone files
  81.       produced are host independant (except unfortunately assume that
  82.       time_t's are 4 bytes long) - the same compiled files can be used
  83.       from a SUN or a Vax (assuming some remote file system to access
  84.       them).
  85.  
  86.       Vendors: you are expected to provide at least binaries of zic
  87.       and zdump, as well as the library functions of course, and the
  88.       sources of the time data files in any release of this code.
  89.       Providing sources of all this would be an entirely reasonable
  90.       thing to do.
  91.  
  92.       So ends what is probably the longest moderator's note in the
  93.       history of mod.sources.            ... kre ]
  94.